package com.up360.rapidcalc.events
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	/**
	 * 作者:郎福涛
	 * 日期:2012-4-4 下午08:29:09
	 * 说明:事件收发中心
	 */	
	public class EventCenter extends EventDispatcher
	{
		private static var _instance:EventCenter;
		
		public function EventCenter(target:IEventDispatcher=null)
		{
			super(target);
		}
		/**
		 * 发送事件
		 * @param type 事件类型
		 * @param param 参数
		 */		
		public function dispatch(type:String,param:Object=null):void{
			dispatchEvent(new CommonEvent(type,param));
		}
		
		public static function get instance():EventCenter{
			if(!_instance) _instance=new EventCenter();
			return _instance;
		}
		
	}
}